home *** CD-ROM | disk | FTP | other *** search
/ PC for Alla 2005 May / PC för Alla 0505.iso / fullversioner / realsoft3d / data1.cab / Scripting / scripts / js / oops / r3prglng.js < prev    next >
Encoding:
JavaScript  |  2005-04-04  |  10.5 KB  |  379 lines

  1.  
  2. // JavaScript wrapper for r3prglng.h
  3. // Auto generated file, do not modify by hand
  4. // Copyright ⌐ 2004, Realsoft Graphics Oy
  5.  
  6. var R3_PRGLNG_H = 1;
  7. include("oops/r3root.js")
  8. include("oops/r3vector.js")
  9. include("oops/r3color.js")
  10. include("oops/r3coords.js")
  11. include("oops/r3matrix.js")
  12.  
  13.  
  14. var R3CLID_PRGLNG = 260;
  15.  
  16.  
  17.  
  18.  
  19. // Description: Run a given program.
  20. // Returns: Boolean, true if succeeded
  21. // p3: String, pointer to null terminated string containing the program to be executed
  22.  
  23. R3PLM_INTERP = 260000;
  24.  
  25. function mR3PLM_INTERP(p3) {
  26.   return   DoA(this.r3obj, 260000, p3, R3TID_STRING, 0);
  27. }
  28.  
  29. // Description: Evaluate an expression
  30. // Virtual method
  31. // Returns: Boolean, TRUE if evaluation succeeded
  32. // p1: Number, address for result
  33. // p3: String, Expression to be evaluated
  34.  
  35. R3PLM_EVAL = 260001;
  36.  
  37. function mR3PLM_EVAL(p1, p3) {
  38.   return   DoA2(this.r3obj, 260001, p1, R3TID_FLOAT, 0, p3, R3TID_STRING, 0);
  39. }
  40.  
  41. // Description: Print out a message to the user
  42. // p1: String, format string
  43. // p3: Object, parameter corresponding the format string.
  44.  
  45. R3PLM_PRINT = 260002;
  46.  
  47. function mR3PLM_PRINT(p1, p3) {
  48.   DoA2(this.r3obj, 260002, p1, R3TID_STRING, 0, p3, R3TID_OBJECT, 0);
  49. }
  50.  
  51. // Description: The base class provides a mechanism for keeping track of installed languages. A new
  52. //      language can register to the base class using this method.
  53. // Returns: Boolean, TRUE if succesfully registered.
  54. // p1: Integer, class id of the new language
  55. // p2: String, symbolic name for the language
  56. // p3: String, file name extension
  57.  
  58. R3CPLM_REGISTERLANGUAGE = 260003;
  59.  
  60. function mR3CPLM_REGISTERLANGUAGE(p1, p2, p3) {
  61.   return   DoA3(this.r3obj, 260003, p1, R3TID_INTEGER, 0, p2, R3TID_STRING, 0, p3, R3TID_STRING, 0);
  62. }
  63.  
  64. // Description: Enumerates registered languages
  65. // Returns: Integer, return value from the callback
  66. // p1: Object, callback object
  67. // p2: Integer, callback method
  68. // p3: Object, user data
  69.  
  70. R3CPLM_ENUMLANGUAGES = 260004;
  71.  
  72. function mR3CPLM_ENUMLANGUAGES(p1, p2, p3) {
  73.   return   DoA3(this.r3obj, 260004, p1, R3TID_OBJECT, 0, p2, R3TID_INTEGER, 0, p3, R3TID_OBJECT, 0);
  74. }
  75.  
  76. // Description: Define a new variable.
  77. // Virtual method
  78. // Returns: Boolean, TRUE if succeeded
  79. // p3: String, name of variable
  80.  
  81. R3PLM_DEFINEVAR = 260005;
  82.  
  83. function mR3PLM_DEFINEVAR(p3) {
  84.   return   DoA(this.r3obj, 260005, p3, R3TID_STRING, 0);
  85. }
  86.  
  87. // Description: Set a variable to value
  88. // Virtual method
  89. // Returns: Boolean, TRUE if setting succeeded
  90. // p2: String, name of variable
  91. // p3: Object, Value for the variable to be set, If sizeof(val) <= sizeof(R3INT) passed by value.
  92. //      If bigger, passed by reference.
  93.  
  94. R3PLM_SETVAR = 260006;
  95.  
  96. function mR3PLM_SETVAR(p2, p3) {
  97.   return   DoA3(this.r3obj, 260006, 0, R3TID_INTEGER, 0, p2, R3TID_STRING, 0, p3, R3TID_OBJECT, 0);
  98. }
  99.  
  100. // Description: Fetch value of given variable
  101. // Virtual method
  102. // Returns: Boolean, true if found
  103. // p2: String, name of the variable
  104. // p3: Object, buffer for the variable value to be fetched
  105.  
  106. R3PLM_GETVAR = 260007;
  107.  
  108. function mR3PLM_GETVAR(p2, p3) {
  109.   return   DoA3(this.r3obj, 260007, 0, R3TID_INTEGER, 0, p2, R3TID_STRING, 0, p3, R3TID_OBJECT, 0);
  110. }
  111.  
  112. // Description: Load and execute a script
  113. // Returns: Boolean, true if succeeded
  114. // p3: String, file name    
  115.  
  116. R3PLM_LOAD = 260008;
  117.  
  118. function mR3PLM_LOAD(p3) {
  119.   return   DoA(this.r3obj, 260008, p3, R3TID_STRING, 0);
  120. }
  121.  
  122. // Description: Error has occurred, terminate execution and prompt error message
  123. // p3: String, error message    
  124.  
  125. R3PLM_ERROR = 260010;
  126.  
  127. function mR3PLM_ERROR(p3) {
  128.   DoA(this.r3obj, 260010, p3, R3TID_STRING, 0);
  129. }
  130.  
  131. // Description: Make the given object the 'current working object'.
  132. // Returns: Boolean, true if succeeded.
  133. // p3: String, name of the object
  134.  
  135. R3PLM_MAKECURRENT = 260011;
  136.  
  137. function mR3PLM_MAKECURRENT(p3) {
  138.   return   DoA(this.r3obj, 260011, p3, R3TID_STRING, 0);
  139. }
  140.  
  141. // Description: Set public attribute
  142. // Returns: Object, objec referred by 'name' parameter or NULL if the name couldn't been resolved.
  143. // p1: String, name of the attribute to be fetched
  144.  
  145. R3PLM_GETPUBATTR = 260012;
  146.  
  147. function mR3PLM_GETPUBATTR(p1) {
  148.   return R3ToJS(  DoA2(this.r3obj, 260012, p1, R3TID_STRING, 0, 0, R3TID_INTEGER, 0));
  149. }
  150.  
  151. // Description: Set public attribute.
  152. // Returns: Object, object whose attribute was set or NULL if the name could not been resolved.
  153. // p1: String, name of the attribute to be set
  154.  
  155. R3PLM_SETPUBATTR = 260013;
  156.  
  157. function mR3PLM_SETPUBATTR(p1) {
  158.   return R3ToJS(  DoA2(this.r3obj, 260013, p1, R3TID_STRING, 0, 0, R3TID_INTEGER, 0));
  159. }
  160.  
  161. // Description: List public attributes defined by given object
  162. // Returns: Boolean, true if object rerefred by 'name' was found
  163. // p3: String, name of the object    
  164.  
  165. R3PLM_LISTPUBATTRS = 260014;
  166.  
  167. function mR3PLM_LISTPUBATTRS(p3) {
  168.   return   DoA(this.r3obj, 260014, p3, R3TID_STRING, 0);
  169. }
  170.  
  171. // Description: Print current working object
  172.  
  173. R3PLM_PRINTCURRENT = 260015;
  174.  
  175. function mR3PLM_PRINTCURRENT() {
  176.   DoA(this.r3obj, 260015, 0, R3TID_INTEGER, 0);
  177. }
  178.  
  179. // Description: Make the parent the current working level
  180. // Returns: Boolean, true if succeeded
  181.  
  182. R3PLM_PARENT = 260016;
  183.  
  184. function mR3PLM_PARENT() {
  185.   return   DoA(this.r3obj, 260016, 0, R3TID_INTEGER, 0);
  186. }
  187.  
  188. // Description: Make the previous object the current working object.
  189. // Returns: Boolean, true if succeeded
  190.  
  191. R3PLM_NEXT = 260017;
  192.  
  193. function mR3PLM_NEXT() {
  194.   return   DoA(this.r3obj, 260017, 0, R3TID_INTEGER, 0);
  195. }
  196.  
  197. // Description: Make the next object the current working object.
  198. // Returns: Boolean, true if succeeded
  199.  
  200. R3PLM_PREV = 260018;
  201.  
  202. function mR3PLM_PREV() {
  203.   return   DoA(this.r3obj, 260018, 0, R3TID_INTEGER, 0);
  204. }
  205.  
  206. // Description: Print out class information of the given object.
  207. // Returns: Boolean, true if object was found
  208. // p3: String, name of the object to be studied    
  209.  
  210. R3PLM_PRINTCLASS = 260019;
  211.  
  212. function mR3PLM_PRINTCLASS(p3) {
  213.   return   DoA(this.r3obj, 260019, p3, R3TID_STRING, 0);
  214. }
  215.  
  216. // Description: Delete given object(s).
  217. // Returns: Boolean, true if succeeded
  218. // p3: String, name of the object(s) to be deleted.    
  219.  
  220. R3PLM_REMOVE = 260020;
  221.  
  222. function mR3PLM_REMOVE(p3) {
  223.   return   DoA(this.r3obj, 260020, p3, R3TID_STRING, 0);
  224. }
  225.  
  226. // Description: Fetch symbolic name for given id (class id, method id, attribute id.). Class method.
  227. // Returns: String, string corresponding to the given id.
  228. // p1: Integer, class id
  229. // p2: Integer, see R3ITS_ codes below
  230. // p3: Integer, id to be mapped. 
  231.  
  232. R3PLCM_GETNAMEFORID = 260021;
  233.  
  234. function mR3PLCM_GETNAMEFORID(p1, p2, p3) {
  235.   return   DoA3(this.r3obj, 260021, p1, R3TID_INTEGER, 0, p2, R3TID_INTEGER, 0, p3, R3TID_INTEGER, 0);
  236. }
  237.  
  238. // Description: Register function for mapping identifiers to symbolic * names.
  239. // Returns: String, string corresponding to the given id.
  240. // p3: Integer, identifier to be mapped 
  241.  
  242. R3PLCM_REGISTERMAPPER = 260022;
  243.  
  244. function mR3PLCM_REGISTERMAPPER(p3) {
  245.   return   DoA(this.r3obj, 260022, p3, R3TID_INTEGER, 0);
  246. }
  247.  
  248. // Description: Find scripting class based on given file name extension.
  249. // p3: String, extension    
  250.  
  251. R3PLCM_FINDCLASSBYEXTENSION = 260023;
  252.  
  253. function mR3PLCM_FINDCLASSBYEXTENSION(p3) {
  254.   DoA(this.r3obj, 260023, p3, R3TID_STRING, 0);
  255. }
  256.  
  257.  
  258.  
  259.  
  260. R3PLA_OutputObj = 260500;
  261. function SetR3PLA_OutputObj(value) {
  262.   R3Set(this.r3obj, R3PLA_OutputObj, value, R3TID_OBJECT, 0); 
  263. }
  264.  
  265. function GetR3PLA_OutputObj() {
  266.   return R3ToJS(R3Get(this.r3obj, R3PLA_OutputObj, R3TID_OBJECT, 0)); 
  267. }
  268.  
  269. R3PLA_OutputMth = 260501;
  270. function SetR3PLA_OutputMth(value) {
  271.   R3Set(this.r3obj, R3PLA_OutputMth, value, R3TID_INTEGER, 0); 
  272. }
  273.  
  274. function GetR3PLA_OutputMth() {
  275.   return R3Get(this.r3obj, R3PLA_OutputMth, R3TID_INTEGER, 0); 
  276. }
  277.  
  278. R3PLA_Model = 260503;
  279. function SetR3PLA_Model(value) {
  280.   R3Set(this.r3obj, R3PLA_Model, value, R3TID_OBJECT, 0); 
  281. }
  282.  
  283. function GetR3PLA_Model() {
  284.   return R3ToJS(R3Get(this.r3obj, R3PLA_Model, R3TID_OBJECT, 0)); 
  285. }
  286.  
  287. R3PLA_ErrorString = 260504;
  288. function GetR3PLA_ErrorString() {
  289.   return R3Get(this.r3obj, R3PLA_ErrorString, R3TID_STRING, 0); 
  290. }
  291.  
  292. R3PLA_Current = 260505;
  293. function SetR3PLA_Current(value) {
  294.   R3Set(this.r3obj, R3PLA_Current, value, R3TID_STRING, 0); 
  295. }
  296.  
  297. function GetR3PLA_Current() {
  298.   return R3Get(this.r3obj, R3PLA_Current, R3TID_STRING, 0); 
  299. }
  300.  
  301. var R3PLA_ErrorCode = 260506; // Integer
  302. R3PLA_ErrorObj = 260507;
  303. function SetR3PLA_ErrorObj(value) {
  304.   R3Set(this.r3obj, R3PLA_ErrorObj, value, R3TID_OBJECT, 0); 
  305. }
  306.  
  307. function GetR3PLA_ErrorObj() {
  308.   return R3ToJS(R3Get(this.r3obj, R3PLA_ErrorObj, R3TID_OBJECT, 0)); 
  309. }
  310.  
  311. R3PLA_ErrorMth = 260508;
  312. function SetR3PLA_ErrorMth(value) {
  313.   R3Set(this.r3obj, R3PLA_ErrorMth, value, R3TID_INTEGER, 0); 
  314. }
  315.  
  316. function GetR3PLA_ErrorMth() {
  317.   return R3Get(this.r3obj, R3PLA_ErrorMth, R3TID_INTEGER, 0); 
  318. }
  319.  
  320. var R3PLERR_INVALIDNAME = 0;
  321. var R3PLERR_INVALIDATTRIBUTE = 1;
  322. var R3PLERR_NOMEMORY = 2;
  323. var R3PLERR_NOTALEVELOBJECT = 3;
  324. var R3PLERR_NOMODEL = 4;
  325. var R3PLERR_MAKETAGLIST = 5;
  326. var R3ITS_ANY = 0;
  327. var R3ITS_CLID = 1;
  328. var R3ITS_MTH = 2;
  329. var R3ITS_ATTR = 3;
  330.  
  331.  
  332. function r3Prglng () { 
  333.    this.base = r3God;
  334.    if(arguments.length) {
  335.       this.base(R3CLID_PRGLNG, arguments);
  336.    }
  337.    // Methods
  338.    this.INTERP=mR3PLM_INTERP;
  339.    this.EVAL=mR3PLM_EVAL;
  340.    this.PRINT=mR3PLM_PRINT;
  341.    this.REGISTERLANGUAGE=mR3CPLM_REGISTERLANGUAGE;
  342.    this.ENUMLANGUAGES=mR3CPLM_ENUMLANGUAGES;
  343.    this.DEFINEVAR=mR3PLM_DEFINEVAR;
  344.    this.SETVAR=mR3PLM_SETVAR;
  345.    this.GETVAR=mR3PLM_GETVAR;
  346.    this.LOAD=mR3PLM_LOAD;
  347.    this.ERROR=mR3PLM_ERROR;
  348.    this.MAKECURRENT=mR3PLM_MAKECURRENT;
  349.    this.GETPUBATTR=mR3PLM_GETPUBATTR;
  350.    this.SETPUBATTR=mR3PLM_SETPUBATTR;
  351.    this.LISTPUBATTRS=mR3PLM_LISTPUBATTRS;
  352.    this.PRINTCURRENT=mR3PLM_PRINTCURRENT;
  353.    this.PARENT=mR3PLM_PARENT;
  354.    this.NEXT=mR3PLM_NEXT;
  355.    this.PREV=mR3PLM_PREV;
  356.    this.PRINTCLASS=mR3PLM_PRINTCLASS;
  357.    this.REMOVE=mR3PLM_REMOVE;
  358.    this.GETNAMEFORID=mR3PLCM_GETNAMEFORID;
  359.    this.REGISTERMAPPER=mR3PLCM_REGISTERMAPPER;
  360.    this.FINDCLASSBYEXTENSION=mR3PLCM_FINDCLASSBYEXTENSION;
  361.  
  362.    // Attributes
  363.    this.GetOutputObj=GetR3PLA_OutputObj;
  364.    this.SetOutputObj=SetR3PLA_OutputObj;
  365.    this.GetOutputMth=GetR3PLA_OutputMth;
  366.    this.SetOutputMth=SetR3PLA_OutputMth;
  367.    this.GetModel=GetR3PLA_Model;
  368.    this.SetModel=SetR3PLA_Model;
  369.    this.GetErrorString=GetR3PLA_ErrorString;
  370.    this.GetCurrent=GetR3PLA_Current;
  371.    this.SetCurrent=SetR3PLA_Current;
  372.    this.GetErrorObj=GetR3PLA_ErrorObj;
  373.    this.SetErrorObj=SetR3PLA_ErrorObj;
  374.    this.GetErrorMth=GetR3PLA_ErrorMth;
  375.    this.SetErrorMth=SetR3PLA_ErrorMth;
  376. }
  377.  
  378. r3Prglng.prototype=new r3Root;
  379. // r3prglng.h_H